Typically, an emulator is a software program that performs processing operations identical to a hardware component such as a central processing unit (CPU). That is, an emulator is a software program that includes description of vast processing operations originally performed by a hardware component and that emulates those processing operations. There has been a strong demand for enhancement in the processing speed of emulators and a number of studies have been undertaken to achieve the same.
For example, Japanese Laid-open Patent Publication No. 02-250122 discloses a technique of counting an instruction usage frequency of instructions emulated in an emulator and performing emulator adjustment with the use of the instruction usage frequency. Generally, in an emulator, the operation of determining the types of instructions that have been emulated (known as an instruction fetch operation) is repeated for a number of times. Thus, by counting the instruction usage frequency of instructions as disclosed in Japanese Laid-open Patent Publication No. 02-250122, the instruction fetch operation can be performed with respect to the instructions in the descending order of their instruction usage frequency. That enables enhancement in the emulator performance.
For example, consider a case when an instruction A has a usage frequency of 10% of the total instruction usage frequency, an instruction B has a usage frequency of 50% of the total instruction usage frequency, and an instruction C has a usage frequency of 20% of the total instruction usage frequency. In that case, performing the first instruction fetch operation with respect to the instruction B leads to the type determination of 50% of the total instructions. Subsequently, performing the second instruction fetch operation with respect to the instruction C leads to the type determination of 70% (=50+20) of the total instructions.
Thus, it is presumable that performing the instruction fetch operation in the descending order of instruction usage frequency results in a decrease in the number of times for which type determination is repeated in an emulator. That enables enhancement in the processing speed of the emulator. To achieve that, for example, the instruction usage frequency of instructions can be simulatedly counted in advance and the emulator can be adjusted in such a way that the instruction fetch operation is performed with respect to the instructions in the statistically descending order of their instruction usage frequency.
However, there are certain limitations on enhancing the emulator performance by simulatedly counting the instruction usage frequency. More particularly, because an emulator performs processing operations of a hardware component such as a CPU, the instruction usage frequency of instructions completely changes depending on the usage environment in which the emulator is executed. In other words, simulation does not necessarily lead to optimal emulator adjustment with respect to the usage environment in which an emulator is actually executed.
Moreover, the usage environment for an emulator is not always constant and changes significantly depending on, for example, a time period or a day of the week. However, if simulation is used to perform emulator adjustment, then the temporal changes in the usage environment are not taken into consideration. As a result, during certain time periods, an emulator may suffer performance loss such as slowdown in the processing speed thereof.